import request from '@/utils/request'

// 新增部门
export const createDept = (data) => request({
  url: '/admin/dept',
  method: 'post',
  data
})

// 删除部门
export const deleteDept = (data) => request({
  url: '/admin/dept',
  method: 'delete',
  data
})

// 修改部门
export const updateDept = (data) => request({
  url: '/admin/dept',
  method: 'put',
  data
})

// 单个查询部门
export const queryDept = (id) => request({
  url: '/admin/dept',
  method: 'get',
  params: { id }
})

// 分页查询部门
export const pageQuery = (data) => request({
  url: '/admin/dept/page',
  method: 'post',
  data
})
